﻿using DataBaseLayer.Abstractions;
using DataBaseLayer.Abstractions.Interfaces.Services;
using DataBaseLayer.Dto;
using DataBaseLayer.Services;

namespace DataBaseLayer.Factories
{
	public class ServiceFactory : ServiceBaseFactory
	{
		#region Variables

		private readonly DocumentManager _dataBase;

		#endregion

		#region Constructors

		public ServiceFactory()
		{
			_dataBase = new DocumentManager();
		}

		#endregion

		#region ServiceBaseFactory Members

		public override IOrdersService<LeaveOrderData> CreateLeaveOrdersService()
		{
			return new LeaveOrdersService(_dataBase);
		}

		public override IOrdersService<DismissalOrderData> CreateDismissalOrdersService()
		{
			return new DismissalOrdersService(_dataBase);
		}

		public override IOrdersService<BusinessTripOrderData> CreateBusinessTripOrdersService()
		{
			return new BusinessTripOrdersService(_dataBase);
		}

		public override ILogOrdersService CreateLogOrdersService()
		{
			return new LogOrdersService(_dataBase);
		}

		#endregion
	}
}
